package com.lethelh.reflect.entity;

/**
 * Goods 实体类
 */
public class Goods {
    private Integer id;
    private String name;
    private Float price;
    private String description;

    public Goods() {
    }

    public Goods(Integer id, String name, Float price, String description) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.description = description;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", description='" + description + '\'' +
                '}';
    }

    public void display(String desc){
        this.setDescription(desc);
        System.out.println("商品描述更改为:"+desc);
    }
}
